package cc.lj.internal.coupons.infrastructure.repository;

import cc.lj.internal.core.model.PageParam;
import cc.lj.internal.coupons.domain.ticket.repository.ITicketMainRepository;
import cc.lj.internal.coupons.infrastructure.po.TicketMainPO;
import cc.lj.internal.coupons.infrastructure.repository.mysql.TicketMainMysqlRespository;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;


/**
 * 电子券主表仓储实现
 * @author liangxifeng
 * @date 2023-06-14
 */
@Repository("ticketMainRepository")
public class TicketMainRepository implements ITicketMainRepository {
    @Resource(name="ticketMainMysqlRespository")
    private TicketMainMysqlRespository repository;


    @Override
    public Integer updateById(TicketMainPO entityPO) {
        return repository.updateById(entityPO);
    }

    @Override
    public TicketMainPO getById(Integer id) {
        TicketMainPO entityPO = repository.getById(id);
        return entityPO;
    }

    @Override
    public PageInfo<TicketMainPO> selectPage(PageParam pageParam) {
        return repository.selectPage(pageParam);
    }

    @Override
    public List<TicketMainPO> getList(TicketMainPO activityBatchRationPO) {
        return repository.getList(activityBatchRationPO);
    }

    @Override
    public List<TicketMainPO> selectIds(List<Integer> idList) {
        return repository.selectIds(idList);
    }

    @Override
    public Integer updateByIds(List<Integer> idList, TicketMainPO ticketMainPO) {
        return repository.updateByIds(idList,ticketMainPO);
    }

}
